package com.xayy.mgt.model;

import cn.kawins.mybatis.base.BaseModel;
import cn.kawins.mybatis.util.SnowflakeId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import lombok.*;

/**
 * @author Nie
 * @version V1.0
 * @date 2023/9/19 9:32
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "health_xw.bayes_fault_info")
@EqualsAndHashCode(callSuper = true)
public class BayesFaultInfo extends BaseModel<Long> {

    @Id
    @ApiModelProperty(value = "主键")
    @KeySql(genId = SnowflakeId.class)
    @JsonSerialize(using = ToStringSerializer.class)
    @Column(name = "id")
    private Long id;
    /**
     * 上级id
     */
    @ApiModelProperty(value = "上级id")
    @Column(name = "parent_id")
    private Long parentId;

    /**
     * 故障名称
     */
    @Column(name = "fault_name")
    @ApiModelProperty(value = "故障名称")
    private String faultName;

    /**
     * 故障概率
     */
    @ApiModelProperty(value = "故障概率")
    @Column(name = "fault_possibility")
    private Double faultPossibility;

    /**
     * 上级id得类别1:健康度信息2：健康度记录信息
     */
    @ApiModelProperty(value = "上级id得类别1:健康度信息2：健康度记录信息")
    @Column(name = "type")
    private Integer type;


}
